package com.one.oa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_user_msg")
public class UserMsg {
    /**
    *序号，主键 */
     @TableId(type = IdType.AUTO)
    private Integer id;
    /**
    *用户id,系统消息0 */
    private Integer uid;
    /**
    *消息类型：1.系统消息 全体消息 2.关注消息 3.粉丝消息 4.登录消息 5.密码修改消息 */
    private Integer type;
    /**
    *消息主题 */
    private String title;
    /**
    *消息内容 */
    private String info;
    /**
    *创建时间 */
    private Date createTime;

    public UserMsg(Integer uid, Integer type, String title, String info) {
        this.uid = uid;
        this.type = type;
        this.title = title;
        this.info = info;
        this.createTime=new Date();
    }
}
